<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/context/mytags.jsp"%>
<t:base type="jquery,easyui,tools,DatePicker"></t:base>
<div class="easyui-layout" fit="true">
  <div region="center" style="padding:0px;border:0px">
  <div style="padding:4px;padding-left:10px">
  	<button onclick="window.history.go(-1);">返回</button>
  </div>
  
  <t:datagrid name="dictGroupList" checkbox="false" fitColumns="true" title="库存盘点明细"  rowStyler="getStyle" 
  actionUrl="stockChecksController.do?itemDatagrid&checkId=${id}" idField="id" fit="true" queryMode="group">
   <t:dgCol title="主键"  field="id"  hidden="true"  queryMode="single"  width="120"></t:dgCol>
   <t:dgCol title="耗材名称"  field="meterialName"  query="true"    queryMode="single"  width="120"></t:dgCol>
   <t:dgCol title="耗材编号"  field="num"  query="true"    queryMode="single"  width="120"></t:dgCol>
   <t:dgCol title="实验室"  field="lab.name"    queryMode="single" query="true" width="100"></t:dgCol> 
   <t:dgCol title="库存数量"  field="balance"    queryMode="single"  width="120"></t:dgCol>
    <t:dgCol title="单位"  field="unit"    queryMode="single"  width="120"></t:dgCol>
   </t:datagrid>
  </div>
 </div>
 <script type="text/javascript">
	 $(document).ready(function(){
	 	//给时间控件加上样式
	 }); 
	 
	 function getStyle(index,row){
		 var balance = row.balance;
		 if(parseInt(balance) < 10){
			 return "background-color:yellow;";
		 }
		 return "";
	 }
 </script>